package com.senven.books.modules.system.role.service.impl;

import com.senven.books.modules.system.role.mapper.SysRoleMapper;
import com.senven.books.modules.system.role.service.SysRoleService;
import com.senven.books.modules.system.user.entity.SysRole;
import com.senven.books.mybatis.dbencrypt.BaseServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;

/**
 * @author : longshengyi
 * @description :
 * @createDate : 2024/7/21 22:43
 */
@Service
public class SysRoleServiceImpl  extends BaseServiceImpl<SysRoleMapper, SysRole> implements SysRoleService {

    @Resource
    private SysRoleMapper sysRoleMapper;

    @Override
    public List<String> findRoleByUserId(Long userId) {
        List<String> roleByUserId = null;
        try {
            roleByUserId = sysRoleMapper.findRoleByUserId(userId);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return roleByUserId;
    }
}
